<template>
  <div class="co_wallet_cash">
    <div
      class="co_wva_box"
      v-if="setData.length>0"
      v-for="(item,index) in setData"
      :key='index'
    >
      <div class="co_wca_l">
        <div>提现</div>
        <div>{{item.create_time}}</div>
      </div>
      <div class="co_wca_r">
        <div>+¥{{item.money/100}}</div>
      </div>
    </div>
    <div
      class="co_kong"
      v-if="setData.length == 0"
    >
      <kong :type='co_kong' img='https://o6wndwjxn.qnssl.com/WechatIMG3.png'></kong>
    </div>
  </div>
</template>

<script>
import kong from '@/components/public/kong.vue'
import {
  shop_log,
  forward_list
} from '@/api/center'
import {
  mapState
} from 'vuex'
export default {
  components: {
    kong
  },
  computed: {
    ...mapState({
      app_id: state => state.app_id,
      user_id: state => state.member_id
    })
  },
  data () {
    return {
      setData: [],
      co_kong: '提现记录'
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getData () {
      let requery = {
        app_id: this.app_id,
        member_id: this.user_id
      }
      forward_list(requery).then(res => {
        this.$store.commit('updateLoadingStatus', { isLoading: false })
        // console.log('提现记录',res)
        let { code, data } = res.data
        if (code == 200) {
          this.setData = data
        }
      })
    }
  }
}
</script>

<style>
.co_wallet_cash {
  width: 100%;
  height: 100vh;
  padding-top: 10px;
  background-color: #f5f5f5;
  box-sizing: border-box;
}
.co_wva_box {
  width: 100%;
  padding: 0 20px;
  height: 70px;
  display: flex;
  background-color: #ffffff;
  border-bottom: 1px solid #f5f5f5;
}
.co_wca_l {
  flex: 5;
  position: relative;
}
.co_wca_l > div:nth-child(1) {
  font-size: 15px;
  color: #1a1a1a;
  font-weight: bold;
  margin-top: 10px;
}
.co_wca_l > div:nth-child(2) {
  position: absolute;
  left: 0;
  bottom: 10px;
  font-size: 14px;
  color: #9e9e9e;
}
.co_wca_r {
  text-align: right;
  flex: 3;
  /* width: 100px; */
  line-height: 70px;
  color: #fd5e5e;
  font-size: 20px;
  font-weight: bold;
}
</style>
